package main

import (
	"fmt"
)

func Add[T int | float64](a, b T) T {
	return a + b
}

func main() {
	res := Add[int](1, 2)
	fmt.Println(res)

	res2 := Add[float64](1.0, 2.0)
	fmt.Println(res2)
}
